home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 10 / CU Amiga Magazine's Super CD-ROM 10 (1997-03-15)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-05][50887 CUAM10].iso / CUCD / Sound / hippo_dopus / hippoplay.dopus5 next >
Text File  |  1996-11-04  |  3KB  |  127 lines

  1. /*
  2.   $VER: Hippoplay.dopus5 v.2.0 (28.10.96)
  3.  
  4.   Play'er script for DirOpus 5.5 by Martin Leopold
  5.   Contact me for any reason at:
  6.   Fido : 2:235/314.58            Amy: 39:141/105.58
  7.   Inter: leopold@hoa.ping.dk     HOA: 10:1/5.58
  8.  
  9. Installation:
  10. The most important thing: Change the line 
  11. StartHip = ""
  12. into your path and filename of hippoplayer i.e. something like this:
  13. StartHip = "Hd1:Utils/music/Hip"
  14.  
  15. If you want to use this script as a filetype, make a filetype called
  16. and add the following class:
  17.  mathcname: (S3M|Fred|S3M|mod|MDAT).#?
  18.  
  19. As the function enter the following, set the cycle gadget to ARexx:
  20.  HippoPlay.opus5 {Qp} {Ql} {f} [programfile] [HIDE?]
  21.  
  22. Instead of [programfile] write the full path including filname of your
  23. hippoplayer program file, if you leave it out Hippoplayer won't try to
  24. a program file it will simply be ignored.
  25.  
  26. If you wan't to start HippoPlayer hidden, replace [HIDE?] with HIDDEN
  27. otherwise just leave it out.
  28.  
  29. This script features the following controls of Hippoplayer from Dopus:
  30.  QUIT Quit Hippoplayer from DOpus
  31.   Function (set the cycle gadget to ARexx): HippoPlay.opus5 {Qp} {Ql}
  32.  RPlay Plays a song from the list by random
  33.   Function (set the cycle gadget to ARexx): HippoPlay.opus5 {Qp} {Ql}
  34.   
  35. Thanks to K-P Koljonen for making Hippoplayer the best player
  36. */
  37.  
  38. Parse Arg port ' ' lhandle ' "' File '"' ' ' progfile ' ' hideyn
  39.  
  40. StartHip = ""
  41.  
  42. options results
  43. HipResult=Show(P,"HIPPOPLAYER")
  44.  
  45. Address value port
  46.  
  47. If UPPER(File) = "RPLAY" then call RPLAY
  48. If UPPER(File) = "QUIT" then call Quit
  49. If UPPER(progfile) = "HIDE" then HideYN="HIDE"
  50.  
  51. If File = "" Then Do
  52.     Call TitleBar
  53.     Exit 0
  54. End
  55.  
  56. PPYN = ""
  57.  
  58. If HipResult=0 Then do
  59.     lister set lhandle title 'Loading HippoPlayer...'
  60.     lister refresh lhandle full
  61.  
  62.     if HideYN = "HIDE" then Address Command ''StartHip' HIDE "'file'"'
  63.     else Address Command ''StartHip' "'file'"'
  64.  
  65.     Address Command 'waitforport HIPPOPLAYER'
  66.     If ProgFile~='' & ProgFile~="HIDE" then Address 'HIPPOPLAYER' LOADPRG
  67.     lister set lhandle source
  68. End
  69.  
  70. PPYN = " - Unpacked"
  71. call Open(PPTest,File,r)
  72. PTest = ReadCh(PPTest,4)
  73. call Close(PPTest)
  74. If PTest = "PP20" Then PPYN = " - PowerPacked"
  75. If PTest = "XPKF" Then PPYN = " - XPK-Packed"
  76.  
  77. If HipResult~=0 then do
  78.     if PTest ~= " - Unpacked" then do
  79.         lister set lhandle title "Loading & decrunching..."
  80.         lister refresh lhandle full
  81.     END
  82.     Else do
  83.         lister set handle title "Loading..."
  84.         lister refresh lhandle full
  85.     END
  86.  
  87.     address 'HIPPOPLAYER'
  88.     add File
  89.     get NFIL
  90.     CHOOSE result
  91.     PLAY
  92.     DEL
  93.     Address value port
  94. End
  95.  
  96. Call TitleBar
  97.  
  98. Exit 0
  99.  
  100. TitleBar:
  101.     If Show(P,port) = 1 Then Do
  102.         address 'HIPPOPLAYER' get name
  103.         Fil = result
  104.         Fil = space(Fil,0)
  105.         lister set lhandle title "Playing: "Fil""
  106.         lister refresh lhandle full
  107.     End    
  108. Return
  109.  
  110. RPlay:
  111.     If HipResult = 0 Then Exit 0
  112.     address 'HIPPOPLAYER'
  113.     get NFIL
  114.     IF result>1 then RANDPLAY
  115.     address value port
  116.         lister set lhandle title
  117.     lister refresh lhandle full
  118.     Exit 0
  119.  
  120. Quit:
  121.     If HipResult = 0 Then Exit 0
  122.     address 'HIPPOPLAYER' QUIT
  123.         lister set lhandle title
  124.     lister refresh lhandle full
  125.     Exit 0
  126.  
  127.